package com.aaron.demo1.test.megaeyes.util;

/**
 * @program: demo
 * @description:
 * @author: liying
 * @create: 2020-03-26 13:39:58
 **/
public class AuthenticationUtils {
    //生成签名
    public static String getSignature(String userName, String password, String realm, String randomKey, String encryptType) {
        String signature = MD5Utils.encrypt(password, encryptType);
        signature = MD5Utils.encrypt(userName + signature, encryptType);
        signature = MD5Utils.encrypt(signature, encryptType);
        signature = MD5Utils.encrypt(userName + ":" + realm + ":" + signature, encryptType);
        signature = MD5Utils.encrypt(signature + ":" + randomKey, encryptType);
        return signature;
    }


}
